package com.warm.test.swagger;

import cn.dev33.satoken.annotation.SaIgnore;
import com.warm.log.annotation.Log;
import com.warm.log.enums.BusinessType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.noear.solon.annotation.Controller;
import org.noear.solon.annotation.Mapping;
import org.noear.solon.validation.annotation.Valid;

import java.util.HashMap;
import java.util.Map;

/**
 * swagger最简用法
 *
 * @author warm
 */
@SaIgnore
@Mapping("/demo/swagger")
@Api("demo最简用法")
@Valid
@Controller
public class SimpleController {

    @ApiOperation(value = "不描述返回值", notes = "SwaggerConst.COMMON_RES定义返回")
    @ApiImplicitParams({@ApiImplicitParam(name = "paramA", value = "参数a", defaultValue = "1111"),
            @ApiImplicitParam(name = "paramB", value = "参数b", defaultValue = "222"),})
    @Log(title = "demo最简用法", businessType = BusinessType.INSERT)
    @Mapping("test1")
    public Map test1() {
        return new HashMap();
    }

}
